<?php
/**
 * 
 * @author Radovan Dvorsky
 * @version 20091223
 *
 * TODO: Dorobiť nastavenia cez pole 
 */
class Zend_View_Helper_RtEditor extends Zend_View_Helper_Abstract
{	
	
	public function rtEditor($rteClass)
    {
        $jquery = $this->view->jQuery();
        $jquery->enable(); // enable jQuery Core Library

        // get current jQuery handler based on noConflict settings
       $jqHandler = ZendX_JQuery_View_Helper_JQuery::getJQueryHandler();		
     	
				
       $function = '("'.$rteClass.'").rte({'
        		  . 	'css: ["default.css"],'
        		  . 	'width: "auto",'
        		  . 	'height: 600,'
        		  . 	'controls_rte: rte_toolbar,'
        		  .		'controls_html: html_toolbar'
        		  . '});';
	
        $jquery->addOnload($jqHandler . $function);
        return '';
    }
}